﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GuestbookSet.aspx.cs" Inherits="weikebuluo.wxgzpt.Customer.GuestBook.GuestbookSet" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta content="IdeaSoft软件、微信营销、微信代运营、微信定制开发、微信托管、微网站、微商城、微营销" name="Keywords">
	<meta content="IdeaSoft软件，国内最大的微信公众智能服务平台，IdeaSoft软件八大微体系：微菜单、微官网、微会员、微活动、微商城、微推送、微服务、微统计，企业微营销必备。" name="Description">
    <link href="/css/Bootstrap/bootstrap.min.css" rel="stylesheet"
        type="text/css" />
    <link href="/css/Bootstrap/bootstrap.responsive.min.css"
        rel="stylesheet" type="text/css" />
    <link href="/css/Bootstrap/style.css" rel="stylesheet" type="text/css" />
    <link href="/css/Bootstrap/todc_bootstrap.css" rel="stylesheet"
        type="text/css" />
    <link href="/css/Bootstrap/themes.css" rel="stylesheet"
        type="text/css" />
    <link href="/css/Bootstrap/resource.css" rel="stylesheet"
        type="text/css" />
    <link href="/css/Bootstrap/inside.css" rel="stylesheet"
        type="text/css" />
    <link href="/css/Bootstrap/chosen.css" rel="stylesheet"
        type="text/css" />

    <script src="/Scripts/JQuery.min.js" type="text/javascript"></script>
    <script src="/Scripts/JQuery.cookie.js" type="text/javascript"></script>
    <script src="/Scripts/Bootstrap.min.js" type="text/javascript"></script>
    <script src="/Scripts/JQuery.form.min.js" type="text/javascript"></script>

    <script src="/Scripts/JQuery.validate.min.js" type="text/javascript"></script>
    <script src="/Scripts/JQuery.validate.methods.js" type="text/javascript"></script>
    <script src="/Scripts/zeroclipboard.min.js" type="text/javascript"></script>
    <script src="../../../scripts/Inside.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/UploadImg.js?v=<%=Application["CssJsVer"] %>"></script>
<title>IdeaSoft软件</title>
</head>
<body>
	<div class="container-fluid" id="content">

    <div id="main">
        <div class="container-fluid">

            <div class="row-fluid">
                <div class="span12">
                    <div class="box">
                        <div class="box-title">
                            <div class="span10">
                                <h3><i class="icon-edit"></i>留言板配置</h3>
                            </div>
                            <div class="span2"><a class="btn" href="Javascript:window.history.go(-1)">返回</a></div>
                        </div>
                        <div class="box-content">
                            <form action="GuestbookSet.aspx" method="POST" class='form-horizontal form-validate'>
                                <input type="hidden" name="action" value="bindguest">
                                <div class="control-group">
                                    <label for="wxname" class="control-label">触发关键字：</label>
                                    <div class="controls">
                                        <input type="text" name="keyword" id="wxname" value="<%=GuestbookSet_KeyWord %>" data-rule-required="true"> <span class="maroon">*</span><span class="help-inline">如有多个关键字请用空格隔开，用户输入此关键词将会触发此活动。</span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="title">
                                        显示名称</label>
                                    <div class="controls">
                                        <input type="text" name="msg_name" value="<%=GuestbookSet_Name %>" id="title" data-rule-required="true" data-rule-maxlength="30" />
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label">图文封面:</label>
                                    <div class="controls">
                                        
                                        <img class="thumb_img" id="thumb_img" src="<%=GuestbookSet_CoverPic %>" style="max-height: 100px;">
                                        <input id="picurl" type="text" style="display:none;" name="image" value="<%=GuestbookSet_CoverPic %>" class="input-xlarge" readonly="">
                                                    <span class="maroon">*</span>
                                                    <span class="help-inline">
                                                        <button class="btn select_img" id="select_img_cover" type="button">选择封面</button></span>

                                        <span class="help-inline">
                                                （尺寸：宽720像素，高400像素） 小于200k
                                        </span>
                                    </div>
                                </div>
                                <div class="control-group">
                                    <label class="control-label" for="fanslocal">
                                        头部图片</label>
                                                                        <div class="controls">
                                                                            
                                        <img class="thumb_img" id="thumb_img_top" src="<%=GuestbookSet_TopPic %>" style="max-height: 70px;">
                                        <input id="picurltop" type="text" style="display:none;" name="picurl" class="input-xlarge" value="<%=GuestbookSet_TopPic %>" readonly="" data-rule-url="true" />
                                        <span class="help-inline">
                                            <button class="btn select_img" id="select_img_top" type="button">选择图片</button></span>
                                    </div>
                                                                    </div>
<%--                                <script type="text/javascript">
                                $(function(){
                                    var GuestbookSet_Audit = "<%=GuestbookSet_Audit %>";
                                    if(GuestbookSet_Audit = 1){
                                        $("#audit1").attr("checked","checked");
                                    }else{
                                        $("#audit2").attr("checked","checked");
                                    }
                                })
                                </script>
--%>
<%--                                <div class="control-group">
                                    <label class="control-label" for="title">
                                        是否开放留言板</label>
                                    <div class="controls">
                                        <label class="radio inline">
                                            <input name="audit" id="audit1" type="radio" value="1">
                                            需审核</label>
                                        <label class="radio inline">
                                            <input type="radio" checked="checked" id="audit2" name="audit" value="2">
                                            无需审核
                                        </label>
                                    </div>
                                </div>
--%>                                <script type="text/javascript">
                                    $(function () {
                                        var GuestbookSet_WeChatID = "<%=GuestbookSet_WeChatID %>";
                                        var GuestbookSet_WeChatID_List = GuestbookSet_WeChatID.split(",");
                                        var str = "";
                                        $(GuestbookSet_WeChatID_List).each(function (i) {
                                            str += '<li>' + GuestbookSet_WeChatID_List[i] + '<input type="hidden" name="openidlist[]" value="' + GuestbookSet_WeChatID_List[i] + '"/>';
                                            str += '<a class="btn btn-mini pull-right del"><i class="icon-remove"></i></a> </li>';
                                        });
                                        $("ul.openidlist").append(str);
                                    })
                                </script>
                                <div class="control-group">
                                    <label class="control-label" for="openid">
                                        管理员Openid</label>
                                    <div class="controls">
                                        <div class="input-append"><input type="text" name="adminopenid" id="openid" /><button class="btn addopenid" type="button"><i class="icon-plus"></i>添加</button></div>
										<span class="help-inline">在留言板提交留言,然后在“留言列表”中找到自己的openid并在这里添加为管理</span>
                                        
                                        <ul class="unstyled margin-top10 openidlist" style="width:300px">
                                                                                    </ul>
                                        <script type="text/javascript">
                                            var url = "http://" + window.location.host + "/web/wechat/vip/guest.aspx";
                                            $(function () {
                                                $("ul.openidlist li a.del").live("click", function () {
                                                    $(this).parents("li").remove();
                                                });
                                                $("button.addopenid").click(function () {
                                                    var $openid = $("#openid"), $openidval = $openid.val().trim();

                                                    if ($openidval.length == 0) {
                                                        G.ui.tips.info("请输入管理员Openid");
                                                    } else {
                                                        var tmp = '<li>{0}<input type="hidden" name="openidlist[]" value="{0}"/>  <a class="btn btn-mini pull-right del"><i class="icon-remove"></i></a> </li>';
                                                        $("ul.openidlist").append(tmp.format($openidval));
                                                    }
                                                })
                                                $(".copy_text").html(url);
                                            })
                                        </script>
                                    </div>
                                </div>
                                   <div class="control-group">
                                    <label class="control-label" for="title">
                                        留言板外链地址</label>
                                    <div class="controls">
                                       <span class="copy_text"></span>
                                    </div>
                                </div>
                                <div class="form-actions">
                                    <button id="bsubmit" type="submit" data-loading-text="提交中..." class="btn btn-primary">保存</button>
                                    <button type="button" class="btn" onclick="window.location='picture-text-repaly.html'">取消</button>

                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div></body>
</html>
<script>
    $(function () {
        $("#select_img_cover").initUpload({ showID: 'thumb_img', hideID: 'picurl', savePath: 'GuestbookSet&dir=image' });
        $("#select_img_top").initUpload({ showID: 'thumb_img_top', hideID: 'picurltop', savePath: 'GuestbookSet&dir=image' });
    })
</script>